export default {
	state:{
		salesData:[],
		pageTotal:0,
	},
	mutations:{
		getSalesOptions(state,val){
			val.loading = true
			window.axios.get(this.$api.getSaleBillList,{
				params:val.params
			}).then((res)=>{
				state.salesData = res.data.result
				val.tableOptions = res.data.result
				val.loading = false
			})
		},
		getPageTotal(state,val){
			window.axios.get(this.$api.getSaleBillNum,{
				params:val.params
			}).then((res)=>{
				state.pageTotal = res.data.result.total
				val.pageTotal = res.data.result.total
			})
		}
	}
}
